//
//  LFFreshOrderCollectionViewCell.m
//  newload
//
//  Created by xue-iOS-work on 16/9/25.
//  Copyright © 2016年 xue. All rights reserved.
//

#import "LFFreshOrderCollectionViewCell.h"
@interface LFFreshOrderCollectionViewCell()
@end
@implementation LFFreshOrderCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setModel:(LFFreshOrdergoodsModel *)model
{
    _model = model;
    if([model.name hasPrefix:@"[次日达]"]){
        self.titleName.text = [model.name substringFromIndex:5];
    }else
    {
        self.titleName.text = model.name;
        
    }
    [self.iconName sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"v2_placeholder_half_size"]];
    self.nowPrice.text = [NSString stringWithFormat:@"¥ %@",model.partner_price];
    self.YuanPrice.text = [NSString stringWithFormat:@"¥ %@",model.market_price];
    if (model.pm_desc) {
        self.descLabel.text = model.pm_desc;
    }
}
- (IBAction)clickAddBtn:(id)sender {
//    NSLog(@"正在点击");
    [[NSNotificationCenter defaultCenter]postNotificationName:@"papapa" object:nil userInfo:@{@"imageView":self.iconName,@"model":self.model}];
    
}

@end
